package edu.hrbu.kwaidu.constant;

/**
 * @author xudengyu
 */
public class SystemConstant {

    // todo system
    public static final String SYSTEM_DEFAULT_PWD = "123456";
    public static final Long SYSTEM_ROOT_ID = 1L;
    public static final String SYSTEM_ENCRYPT_SALT = "kwaidu";
    public static final Long SYSTEM_MENU_PARENT_ID = 1L;
    public static final int SYSTEM_TEL_LENGTH = 11;
    public static final int SYSTEM_PWD_MIN_LENGTH = 6;
    public static final int SYSTEM_PWD_MAX_LENGTH = 12;
    public static final Byte SYSTEM_ENABLE_STATUS = 0;
    public static final Byte SYSTEM_BUTTON_TYPE = 2;

    // todo redis
    public static final String REDIS_TOKEN_PREFIX = "TOKEN_PREFIX:";
    public static final String REDIS_PERMS_PREFIX = "PERMS_PREFIX:";
    public static final String REDIS_ROLE_PREFIX = "ROLE_PREFIX:";
    public static final int REDIS_HALF_TTL = 30;

    // todo reqheader
//    public static final String REQ_HEADER_PHONE = "REQ_HEADER_PHONE";
//    public static final String REQ_HEADER_AUTHORIZATION = "REQ_HEADER_AUTHORIZATION";
    public static final String REQ_HEADER_TOKEN = "token";

    // todo exception
    public static final String EXCEPTION_PARAM_BLANK = "请求参数为空";
    public static final String EXCEPTION_NO_AUTH = "没有权限";
    public static final String EXCEPTION_UPDATE_FAIL = "数据保存失败";
    public static final String EXCEPTION_REMOVE_FAIL = "数据删除失败";
    public static final String EXCEPTION_DISABLE = "该手机号已被禁用";
    public static final String EXCEPTION_ROLE_NAME_REPEAT = "该角色名称已被使用";
    public static final String EXCEPTION_USER_INFO_BLANK = "用户信息不可为空";
    public static final String EXCEPTION_USER_INFO_INVALID = "信息不合法";
    public static final String EXCEPTION_USER_LOGIN_TEL_INEXIST = "请注册后再登录";
    public static final String EXCEPTION_USER_LOGIN_FAIL = "登录失败";
    public static final String EXCEPTION_USER_SAVE_TEL_REPEAT = "该手机号已被使用";
    public static final String EXCEPTION_TOKEN_BLANK = "token为空";
    public static final String EXCEPTION_BAD_CREDENTIALS = "Bad Credentials";


}
